import unittest, ddt
from APITest.Demo_unittest.demo0908_API_prepare.calculator import Count


# @ddt.ddt
# class TestCal(unittestdemo.TestCase):
#     def setUp(self):
#         print('Start...')
#
#     def tearDown(self):
#         print('End...')
#
#     @ddt.data([2,a.txt,2], [10,2,5], [5,a.txt,5])
#     @ddt.unpack
#     def testDiv(self, a, b, c):
#         cal = Count(a,b)
#         self.assertEqual(cal.div(), c)

@ddt.ddt
class TestCal(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        print('Start...')

    @classmethod
    def tearDownClass(cls):
        print('End...')

    @ddt.data([2, 1, 2], [10, 2, 5], [5, 1, 5])
    @ddt.unpack
    def testDiv(self, a, b, c):
        cal = Count(a, b)
        self.assertEqual(cal.div(), c)


if __name__ == '__main__':
    unittest.main()
    # TestCal('testDiv').run()
